﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Infrastructure.ApiCache
{
    /// <summary>
    /// 用于Api接口缓存多少秒
    /// </summary>
    public class HttpApiCacheForSecondAttribute:Attribute
    {
        public int Second { get; set; }
        public bool ByUser { get; set; }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="Second">缓存多少秒</param>
        /// <param name="ByUser">是否按用户维度</param>
        public HttpApiCacheForSecondAttribute(int Second,bool ByUser=false)
        {
            this.Second = Second;
            this.ByUser = ByUser;
        }
    }
}
